package cn.gailvlun.gll.presentation.chat.adapter;

import android.content.Context;

import com.github.markzhai.recyclerview.SingleTypeAdapter;

import java.util.ArrayList;

import cn.gailvlun.gll.R;
import cn.gailvlun.gll.net.Member;



public class RoomMemberAdapter extends SingleTypeAdapter<Member> {
    public RoomMemberAdapter(Context context) {
        super(context, R.layout.item_room_member);
    }

    public int getLastId() {
        return mCollection.get(mCollection.size() - 1).getId();
    }

    ArrayList<Integer> ids;

    public ArrayList<Integer> getProfileIds() {
        if (ids == null) {
            ids = new ArrayList<>();
        }
        ids.clear();
        for (Member member :
                mCollection) {
            ids.add(member.getOwner().getId());
        }

        return ids;
    }
}
